home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs.info-8 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  47.9 KB  |  1,166 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo-1.63
  2. from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Several Buffers,  Prev: Kill Buffer,  Up: Buffers
  29.  
  30. Operating on Several Buffers
  31. ============================
  32.  
  33.    The "buffer-menu" facility is like a "Dired for buffers"; it allows
  34. you to request operations on various Emacs buffers by editing a buffer
  35. containing a list of them.  You can save buffers, kill them (here
  36. called "deleting" them, for consistency with Dired), or display them.
  37.  
  38. `M-x buffer-menu'
  39.      Begin editing a buffer listing all Emacs buffers.
  40.  
  41.    The command `buffer-menu' writes a list of all Emacs buffers into
  42. the buffer `*Buffer List*', and selects that buffer in Buffer Menu
  43. mode.  The buffer is read-only.  You can only change it using the
  44. special commands described in this section.  Most of the commands are
  45. graphic characters.  You can use  Emacs cursor motion commands in the
  46. `*Buffer List*' buffer.  If the cursor is on a line describing a
  47. buffer, the following  special commands apply to that buffer:
  48.  
  49. `d'
  50.      Request to delete (kill) the buffer, then move down.  A `D' before
  51.      the buffer name on a line indicates a deletion request.  Requested
  52.      deletions actually take place when you use the `x' command.
  53.  
  54. `k'
  55.      Synonym for `d'.
  56.  
  57. `C-d'
  58.      Like `d' but move up afterwards instead of down.
  59.  
  60. `s'
  61.      Request to save the buffer.  An `S' befor the buffer name on a line
  62.      indicates the request.  Requested saves actually take place when
  63.      you use the `x' command.  You can request both saving and deletion
  64.      for the same buffer.
  65.  
  66. `~'
  67.      Mark buffer "unmodified".  The command `~' does this immediately
  68.      when typed.
  69.  
  70. `x'
  71.      Perform previously requested deletions and saves.
  72.  
  73. `u'
  74.      Remove any request made for the current line, and move down.
  75.  
  76. `DEL'
  77.      Move to previous line and remove any request made for that line.
  78.  
  79.    All commands that add or remove flags to request later operations
  80. also move down a line.  They accept a numeric argument as a repeat
  81. count, unless otherwise specified.
  82.  
  83.    There are also special commands to use the buffer list to select
  84. another buffer, and to specify one or more other buffers for display in
  85. additional windows.
  86.  
  87. `1'
  88.      Select the buffer in a full-frame window.  This command takes
  89.      effect immediately.
  90.  
  91. `2'
  92.      Immediately set up two windows, with this buffer in one and the
  93.      buffer selected before `*Buffer List*' in the other.
  94.  
  95. `f'
  96.      Immediately select the buffer in place of the `*Buffer List*'
  97.      buffer.
  98.  
  99. `o'
  100.      Immediately select the buffer in another window as if by `C-x 4 b',
  101.      leaving `*Buffer List*' visible.
  102.  
  103. `q'
  104.      Immediately select this buffer, and display any buffers previously
  105.      flagged with the `m' command in other windows.  If there are no
  106.      buffers flagged with `m', this command is equivalent to `1'.
  107.  
  108. `m'
  109.      Flag this buffer to be displayed in another window if the `q'
  110.      command is used.  The request shows as a `>' at the beginning of
  111.      the line.  The same buffer may not have both a delete request and a
  112.      display request.
  113.  
  114.    Going back between a `buffer-menu' buffer and other Emacs buffers is
  115. easy.  You can, for example, switch from the `*Buffer List*' buffer to
  116. another Emacs buffer, and edit there.  You can then reselect the
  117. `buffer-menu' buffer and perform operations already requested, or you
  118. can kill that buffer or pay no further attention to it.   All that
  119. `buffer-menu' does directly is create and select a suitable buffer, and
  120. turn on Buffer Menu mode.  All the other capabilities of the buffer
  121. menu are implemented by special commands provided in Buffer Menu mode.
  122.  
  123.    The only difference between `buffer-menu' and `list-buffers' is that
  124. `buffer-menu' selects the `*Buffer List*' buffer and `list-buffers'
  125. does not.  If you run `list-buffers' (that is, type `C-x C-b') and
  126. select the buffer list manually, you can use all the commands described
  127. here.
  128.  
  129. 
  130. File: xemacs.info,  Node: Windows,  Next: Major Modes,  Prev: Buffers,  Up: Top
  131.  
  132. Multiple Windows
  133. ****************
  134.  
  135.    Emacs can split the frame into two or many windows, which can display
  136. parts of different buffers or different parts of one buffer.  If you are
  137. running XEmacs under X, that means you can have the X window that
  138. contains the Emacs frame have multiple subwindows.
  139.  
  140. * Menu:
  141.  
  142. * Basic Window::     Introduction to Emacs windows.
  143. * Split Window::     New windows are made by splitting existing windows.
  144. * Other Window::     Moving to another window or doing something to it.
  145. * Pop Up Window::    Finding a file or buffer in another window.
  146. * Change Window::    Deleting windows and changing their sizes.
  147.  
  148. 
  149. File: xemacs.info,  Node: Basic Window,  Next: Split Window,  Prev: Windows,  Up: Windows
  150.  
  151. Concepts of Emacs Windows
  152. =========================
  153.  
  154.    When Emacs displays multiple windows, each window has one Emacs
  155. buffer designated for display.  The same buffer may appear in more than
  156. one window; if it does, any changes in its text are displayed in all
  157. the windows that display it.  Windows showing the same buffer can show
  158. different parts of it, because each window has its own value of point.
  159.  
  160.    At any time, one  window is the "selected window"; the buffer
  161. displayed by that window is the current buffer.  The cursor shows the
  162. location of point in that window.  Each other window has a location of
  163. point as well, but since the terminal has only one cursor, it cannot
  164. show the location of point in the other windows.
  165.  
  166.    Commands to move point affect the value of point for the selected
  167. Emacs window only.  They do not change the value of point in any other
  168. Emacs window, including those showing the same buffer.  The same is
  169. true for commands such as `C-x b' to change the selected buffer in the
  170. selected window; they do not affect other windows at all.  However,
  171. there are other commands such as `C-x 4 b' that select a different
  172. window and switch buffers in it.  Also, all commands that display
  173. information in a window, including (for example) `C-h f'
  174. (`describe-function') and `C-x C-b' (`list-buffers'), work by switching
  175. buffers in a non-selected window without affecting the selected window.
  176.  
  177.    Each window has its own mode line, which displays the buffer name,
  178. modification status, and major and minor modes of the buffer that is
  179. displayed in the window.  *Note Mode Line::, for details on the mode
  180. line.
  181.  
  182. 
  183. File: xemacs.info,  Node: Split Window,  Next: Other Window,  Prev: Basic Window,  Up: Windows
  184.  
  185. Splitting Windows
  186. =================
  187.  
  188. `C-x 2'
  189.      Split the selected window into two windows, one above the other
  190.      (`split-window-vertically').
  191.  
  192. `C-x 3'
  193.      Split the selected window into two windows positioned side by side
  194.      (`split-window-horizontally').
  195.  
  196. `C-x 6'
  197.      Save the current window configuration in register REG (a letter).
  198.  
  199. `C-x 7'
  200.      Restore (make current) the window configuration in register REG (a
  201.      letter).  Use with a register previously set with `C-x 6'.
  202.  
  203.    The command `C-x 2' (`split-window-vertically') breaks the selected
  204. window into two windows, one above the other.  Both windows start out
  205. displaying the same buffer, with the same value of point.  By default
  206. each of the two windows gets half the height of the window that was
  207. split.  A numeric argument specifies how many lines to give to the top
  208. window.
  209.  
  210.    `C-x 3' (`split-window-horizontally') breaks the selected window
  211. into two side-by-side windows.  A numeric argument specifies how many
  212. columns to give the one on the left.  A line of vertical bars separates
  213. the two windows.  Windows that are not the full width of the frame have
  214. truncated mode lines which do not always appear in inverse video,
  215. because Emacs display routines cannot display a region of inverse video
  216. that is only part of a line on the screen.
  217.  
  218.    When a window is less than the full width, many text lines are too
  219. long to fit.  Continuing all those lines might be confusing.  Set the
  220. variable `truncate-partial-width-windows' to non-`nil' to force
  221. truncation in all windows less than the full width of the frame,
  222. independent of the buffer and its value for `truncate-lines'.  *Note
  223. Continuation Lines::.
  224.  
  225.    Horizontal scrolling is often used in side-by-side windows.  *Note
  226. Display::.
  227.  
  228.    You can resize a window and store that configuration in a register by
  229. supplying a REGISTER argument to `window-configuration-to-register'
  230. (`C-x 6'). To return to the window configuration established with
  231. `window-configuration-to-register', use `jump-to-register' (`C-x j').
  232.  
  233. 
  234. File: xemacs.info,  Node: Other Window,  Next: Pop Up Window,  Prev: Split Window,  Up: Windows
  235.  
  236. Using Other Windows
  237. ===================
  238.  
  239. `C-x o'
  240.      Select another window (`other-window').  That is the letter `o',
  241.      not zero.
  242.  
  243. `M-C-v'
  244.      Scroll the next window (`scroll-other-window').
  245.  
  246. `M-x compare-windows'
  247.      Find the next place where the text in the selected window does not
  248.      match the text in the next window.
  249.  
  250. `M-x other-window-any-frame N'
  251.      Select the Nth different window on any frame.
  252.  
  253.    To select a different window, use `C-x o' (`other-window').  That is
  254. an `o', for `other', not a zero.  When there are more than two windows,
  255. the command moves through all the windows in a cyclic order, generally
  256. top to bottom and left to right.  From the rightmost and bottommost
  257. window, it goes back to the one at the upper left corner.  A numeric
  258. argument, N, moves several steps in the cyclic order of windows. A
  259. negative numeric argument moves around the cycle in the opposite order.
  260. If the optional second argument ALL-FRAMES is non-`nil', the function
  261. cycles through all frames.  When the minibuffer is active, the
  262. minibuffer is the last window in the cycle; you can switch from the
  263. minibuffer window to one of the other windows, and later switch back
  264. and finish supplying the minibuffer argument that is requested.  *Note
  265. Minibuffer Edit::.
  266.  
  267.    The command `M-x other-window-any-frame' also selects the window N
  268. steps away in the cyclic order.  However, unlike `other-window', this
  269. command selects a window on the next or previous frame instead of
  270. wrapping around to the top or bottom of the current frame, when there
  271. are no more windows.
  272.  
  273.    The usual scrolling commands (*note Display::.) apply to the selected
  274. window only.  `M-C-v' (`scroll-other-window') scrolls the window that
  275. `C-x o' would select.  Like `C-v', it takes positive and negative
  276. arguments.
  277.  
  278.    The command `M-x compare-windows' compares the text in the current
  279. window with the text in the next window.  Comparison starts at point in
  280. each window.  Point moves forward in each window, a character at a time,
  281. until the next set of characters in the two windows are different.
  282. Then the command is finished.
  283.  
  284.    A prefix argument IGNORE-WHITESPACE means ignore changes in
  285. whitespace.  The variable `compare-windows-whitespace' controls how
  286. whitespace is skipped.
  287.  
  288.    If `compare-ignore-case' is non-`nil', changes in case are also
  289. ignored.
  290.  
  291. 
  292. File: xemacs.info,  Node: Pop Up Window,  Next: Change Window,  Prev: Other Window,  Up: Windows
  293.  
  294. Displaying in Another Window
  295. ============================
  296.  
  297.    `C-x 4' is a prefix key for commands that select another window
  298. (splitting the window if there is only one) and select a buffer in that
  299. window.  Different `C-x 4' commands have different ways of finding the
  300. buffer to select.
  301.  
  302. `C-x 4 b BUFNAME RET'
  303.      Select buffer BUFNAME in another window.  This runs
  304.      `switch-to-buffer-other-window'.
  305.  
  306. `C-x 4 f FILENAME RET'
  307.      Visit file FILENAME and select its buffer in another window.  This
  308.      runs `find-file-other-window'.  *Note Visiting::.
  309.  
  310. `C-x 4 d DIRECTORY RET'
  311.      Select a Dired buffer for directory DIRECTORY in another window.
  312.      This runs `dired-other-window'.  *Note Dired::.
  313.  
  314. `C-x 4 m'
  315.      Start composing a mail message in another window.  This runs
  316.      `mail-other-window', and its same-window version is `C-x m' (*note
  317.      Sending Mail::.).
  318.  
  319. `C-x 4 .'
  320.      Find a tag in the current tag table in another window.  This runs
  321.      `find-tag-other-window', the multiple-window variant of `M-.'
  322.      (*note Tags::.).
  323.  
  324.    If the variable `display-buffer-function' is non-`nil', its value is
  325. the function to call to handle `display-buffer'. It receives two
  326. arguments, the buffer and a flag that if non-`nil' means that the
  327. currently selected window is not acceptable. Commands such as
  328. `switch-to-buffer-other-window' and `find-file-other-window' work using
  329. this function.
  330.  
  331. 
  332. File: xemacs.info,  Node: Change Window,  Prev: Pop Up Window,  Up: Windows
  333.  
  334. Deleting and Rearranging Windows
  335. ================================
  336.  
  337. `C-x 0'
  338.      Get rid of the selected window (`delete-window').  That is a zero.
  339.      If there is more than one Emacs frame, deleting the sole remaining
  340.      window on that frame deletes the frame as well. If the current
  341.      frame is the only frame, it is not deleted.
  342.  
  343. `C-x 1'
  344.      Get rid of all windows except the selected one
  345.      (`delete-other-windows').
  346.  
  347. `C-x ^'
  348.      Make the selected window taller, at the expense of the other(s)
  349.      (`enlarge-window').
  350.  
  351. `C-x }'
  352.      Make the selected window wider (`enlarge-window-horizontally').
  353.  
  354.    To delete a window, type `C-x 0' (`delete-window').  (That is a
  355. zero.)  The space occupied by the deleted window is distributed among
  356. the other active windows (but not the minibuffer window, even if that
  357. is active at the time).  Once a window is deleted, its attributes are
  358. forgotten; there is no automatic way to make another window of the same
  359. shape or showing the same buffer.  The buffer continues to exist, and
  360. you can select it in any window with `C-x b'.
  361.  
  362.    `C-x 1' (`delete-other-windows') is more powerful than `C-x 0'; it
  363. deletes all the windows except the selected one (and the minibuffer).
  364. The selected window expands to use the whole frame except for the echo
  365. area.
  366.  
  367.    To readjust the division of space among existing windows, use `C-x
  368. ^' (`enlarge-window').  It makes the currently selected window longer
  369. by one line or as many lines as a numeric argument specifies.  With a
  370. negative argument, it makes the selected window smaller.  `C-x }'
  371. (`enlarge-window-horizontally') makes the selected window wider by the
  372. specified number of columns.  The extra screen space given to a window
  373. comes from one of its neighbors, if that is possible; otherwise, all
  374. the competing windows are shrunk in the same proportion.  If this makes
  375. some windows too small, those windows are deleted and their space is
  376. divided up.   Minimum window size is specified by the variables
  377. `window-min-height' and `window-min-width'.
  378.  
  379.    You can also resize windows within a frame by clicking the left mouse
  380. button on a modeline, and dragging.
  381.  
  382.    Clicking the right button on a mode line pops up a menu of common
  383. window manager operations.  This menu contains the following options:
  384.  
  385. Delete Window
  386.      Remove the window above this modeline from the frame.
  387.  
  388. Delete Other Windows
  389.      Delete all windows on the frame except for the one above this
  390.      modeline.
  391.  
  392. Split Window
  393.      Split the window above the mode line in half, creating another
  394.      window.
  395.  
  396. Split Window Horizontally
  397.      Split the window above the mode line in half horizontally, so that
  398.      there will be two windows side-by-side.
  399.  
  400. Balance Windows
  401.      Readjust the sizes of all windows on the frame until all windows
  402.      have roughly the same number of lines.
  403.  
  404. 
  405. File: xemacs.info,  Node: Major Modes,  Next: Indentation,  Prev: Windows,  Up: Top
  406.  
  407. Major Modes
  408. ***********
  409.  
  410.    Emacs has many different "major modes", each of which customizes
  411. Emacs for editing text of a particular sort.  The major modes are
  412. mutually exclusive;  at any time, each buffer has one major mode.  The
  413. mode line normally contains the name of the current major mode in
  414. parentheses.  *Note Mode Line::.
  415.  
  416.    The least specialized major mode is called "Fundamental mode".  This
  417. mode has no mode-specific redefinitions or variable settings.  Each
  418. Emacs command behaves in its most general manner, and each option is in
  419. its default state.  For editing any specific type of text, such as Lisp
  420. code or English text, you should switch to the appropriate major mode,
  421. such as Lisp mode or Text mode.
  422.  
  423.    Selecting a major mode changes the meanings of a few keys to become
  424. more specifically adapted to the language being edited.  TAB, DEL, and
  425. LFD are changed frequently.  In addition, commands which handle
  426. comments use the mode to determine how to delimit comments.  Many major
  427. modes redefine the syntactical properties of characters appearing in
  428. the buffer.  *Note Syntax::.
  429.  
  430.    The major modes fall into three major groups.  Lisp mode (which has
  431. several variants), C mode, and Muddle mode are for specific programming
  432. languages.  Text mode, Nroff mode, TeX mode, and Outline mode are for
  433. editing English text.  The remaining major modes are not intended for
  434. use on users' files; they are used in buffers created by Emacs for
  435. specific purposes and include Dired mode for buffers made by Dired
  436. (*note Dired::.), Mail mode for buffers made by `C-x m' (*note Sending
  437. Mail::.), and Shell mode for buffers used for communicating with an
  438. inferior shell process (*note Interactive Shell::.).
  439.  
  440.    Most programming language major modes specify that only blank lines
  441. separate paragraphs.  This is so that the paragraph commands remain
  442. useful.  *Note Paragraphs::.  They also cause Auto Fill mode to use the
  443. definition of TAB to indent the new lines it creates.  This is because
  444. most lines in a program are usually indented.  *Note Indentation::.
  445.  
  446. * Menu:
  447.  
  448. * Choosing Modes::     How major modes are specified or chosen.
  449.  
  450. 
  451. File: xemacs.info,  Node: Choosing Modes,  Prev: Major Modes,  Up: Major Modes
  452.  
  453. Choosing Major Modes
  454. ====================
  455.  
  456.    You can select a major mode explicitly for the current buffer, but
  457. most of the time Emacs determines which mode to use based on the file
  458. name or some text in the file.
  459.  
  460.    Use a `M-x' command to explicitly select a new major mode.  Add
  461. `-mode' to the name of a major mode to get the name of a command to
  462. select that mode.  For example, to enter Lisp mode, execute `M-x
  463. lisp-mode'.
  464.  
  465.    When you visit a file, Emacs usually chooses the right major mode
  466. based on the file's name.  For example, files whose names end in `.c'
  467. are edited in C mode.  The variable `auto-mode-alist' controls the
  468. correspondence between file names and major mode.  Its value is a list
  469. in which each element has the form:
  470.  
  471.      (REGEXP . MODE-FUNCTION)
  472.  
  473. For example, one element normally found in the list has the form
  474. `("\\.c$" . c-mode)'. It is responsible for selecting C mode for files
  475. whose names end in `.c'.  (Note that `\\' is needed in Lisp syntax to
  476. include a `\' in the string, which is needed to suppress the special
  477. meaning of `.' in regexps.)  The only practical way to change this
  478. variable is with Lisp code.
  479.  
  480.    You can specify which major mode should be used for editing a certain
  481. file by a special sort of text in the first non-blank line of the file.
  482. The mode name should appear in this line both preceded and followed by
  483. `-*-'.  Other text may appear on the line as well.  For example,
  484.  
  485.      ;-*-Lisp-*-
  486.  
  487. tells Emacs to use Lisp mode.  Note how the semicolon is used to make
  488. Lisp treat this line as a comment.  Such an explicit specification
  489. overrides any default mode based on the file name.
  490.  
  491.    Another format of mode specification is:
  492.  
  493.      -*-Mode: MODENAME;-*-
  494.  
  495. which allows other things besides the major mode name to be specified.
  496. However, Emacs does not look for anything except the mode name.
  497.  
  498.    The major mode can also be specified in a local variables list.
  499. *Note File Variables::.
  500.  
  501.    When you visit a file that does not specify a major mode to use, or
  502. when you create a new buffer with `C-x b', Emacs uses the major mode
  503. specified by the variable `default-major-mode'.  Normally this value is
  504. the symbol `fundamental-mode', which specifies Fundamental mode.  If
  505. `default-major-mode' is `nil', the major mode is taken from the
  506. previously selected buffer.
  507.  
  508. 
  509. File: xemacs.info,  Node: Indentation,  Next: Text,  Prev: Major Modes,  Up: Top
  510.  
  511. Indentation
  512. ***********
  513.  
  514. `TAB'
  515.      Indent current line "appropriately" in a mode-dependent fashion.
  516.  
  517. `LFD'
  518.      Perform RET followed by TAB (`newline-and-indent').
  519.  
  520. `M-^'
  521.      Merge two lines (`delete-indentation').  This would cancel out the
  522.      effect of LFD.
  523.  
  524. `C-M-o'
  525.      Split line at point; text on the line after point becomes a new
  526.      line indented to the same column that it now starts in
  527.      (`split-line').
  528.  
  529. `M-m'
  530.      Move (forward or back) to the first non-blank character on the
  531.      current line (`back-to-indentation').
  532.  
  533. `C-M-\'
  534.      Indent several lines to same column (`indent-region').
  535.  
  536. `C-x TAB'
  537.      Shift block of lines rigidly right or left (`indent-rigidly').
  538.  
  539. `M-i'
  540.      Indent from point to the next prespecified tab stop column
  541.      (`tab-to-tab-stop').
  542.  
  543. `M-x indent-relative'
  544.      Indent from point to under an indentation point in the previous
  545.      line.
  546.  
  547.    Most programming languages have some indentation convention.  For
  548. Lisp code, lines are indented according to their nesting in
  549. parentheses.  The same general idea is used for C code, though details
  550. differ.
  551.  
  552.    Use the TAB command to indent a line whatever the language.  Each
  553. major mode defines this command to perform indentation appropriate for
  554. the particular language.  In Lisp mode, TAB aligns a line according to
  555. its depth in parentheses.  No matter where in the line you are when you
  556. type TAB, it aligns the line as a whole.  In C mode, TAB implements a
  557. subtle and sophisticated indentation style that knows about many
  558. aspects of C syntax.
  559.  
  560.    In Text mode, TAB runs the command `tab-to-tab-stop', which indents
  561. to the next tab stop column.  You can set the tab stops with `M-x
  562. edit-tab-stops'.
  563.  
  564. * Menu:
  565.  
  566. * Indentation Commands:: Various commands and techniques for indentation.
  567. * Tab Stops::            You can set arbitrary "tab stops" and then
  568.                          indent to the next tab stop when you want to.
  569. * Just Spaces::          You can request indentation using just spaces.
  570.  
  571. 
  572. File: xemacs.info,  Node: Indentation Commands,  Next: Tab Stops,  Prev: Indentation,  Up: Indentation
  573.  
  574. Indentation Commands and Techniques
  575. ===================================
  576.  
  577.    If you just want to insert a tab character in the buffer, you can
  578. type `C-q TAB'.
  579.  
  580.    To move over the indentation on a line, type `Meta-m'
  581. (`back-to-indentation').  This command, given anywhere on a line,
  582. positions point at the first non-blank character on the line.
  583.  
  584.    To insert an indented line before the current line, type `C-a C-o
  585. TAB'.  To make an indented line after the current line, use `C-e LFD'.
  586.  
  587.    `C-M-o' (`split-line') moves the text from point to the end of the
  588. line vertically down, so that the current line becomes two lines.
  589. `C-M-o' first moves point forward over any spaces and tabs.  Then it
  590. inserts after point a newline and enough indentation to reach the same
  591. column point is on.  Point remains before the inserted newline; in this
  592. regard, `C-M-o' resembles `C-o'.
  593.  
  594.    To join two lines cleanly, use the `Meta-^' (`delete-indentation')
  595. command to delete the indentation at the front of the current line, and
  596. the line boundary as well.  Empty spaces are replaced by a single
  597. space, or by no space if at the beginning of a line, before a close
  598. parenthesis, or after an open parenthesis.  To delete just the
  599. indentation of a line, go to the beginning of the line and use `Meta-\'
  600. (`delete-horizontal-space'), which deletes all spaces and tabs around
  601. the cursor.
  602.  
  603.    There are also commands for changing the indentation of several
  604. lines at once.  `Control-Meta-\' (`indent-region') gives each line which
  605. begins in the region the "usual" indentation by invoking TAB at the
  606. beginning of the line.  A numeric argument specifies the column to
  607. indent to.  Each line is shifted left or right so that its first
  608. non-blank character appears in that column.  `C-x TAB'
  609. (`indent-rigidly') moves all the lines in the region right by its
  610. argument (left, for negative arguments).  The whole group of lines moves
  611. rigidly sideways, which is how the command gets its name.
  612.  
  613.    `M-x indent-relative' indents at point based on the previous line
  614. (actually, the last non-empty line.)  It inserts whitespace at point,
  615. moving point, until it is underneath an indentation point in the
  616. previous line.  An indentation point is the end of a sequence of
  617. whitespace or the end of the line.  If point is farther right than any
  618. indentation point in the previous line, the whitespace before point is
  619. deleted and the first indentation point then applicable is used.  If no
  620. indentation point is applicable even then, `tab-to-tab-stop' is run
  621. (see next section).
  622.  
  623.    `indent-relative' is the definition of TAB in Indented Text mode.
  624. *Note Text::.
  625.  
  626. 
  627. File: xemacs.info,  Node: Tab Stops,  Next: Just Spaces,  Prev: Indentation Commands,  Up: Indentation
  628.  
  629. Tab Stops
  630. =========
  631.  
  632.    For typing in tables, you can use Text mode's definition of TAB,
  633. `tab-to-tab-stop'.  This command inserts indentation before point,
  634. enough to reach the next tab stop column.  Even if you are not in Text
  635. mode, this function is associated with `M-i' anyway.
  636.  
  637.    You can arbitrarily set the tab stops used by `M-i'.  They are
  638. stored as a list of column-numbers in increasing order in the variable
  639. `tab-stop-list'.
  640.  
  641.    The convenient way to set the tab stops is using `M-x
  642. edit-tab-stops', which creates and selects a buffer containing a
  643. description of the tab stop settings.  You can edit this buffer to
  644. specify different tab stops, and then type `C-c C-c' to make those new
  645. tab stops take effect.  In the tab stop buffer, `C-c C-c' runs the
  646. function `edit-tab-stops-note-changes' rather than the default
  647. `save-buffer'.  `edit-tab-stops' records which buffer was current when
  648. you invoked it, and stores the tab stops in that buffer.  Normally all
  649. buffers share the same tab stops and changing them in one buffer
  650. affects all.  If you make `tab-stop-list' local in one buffer
  651. `edit-tab-stops' in that buffer edits only the local settings.
  652.  
  653.    Below is the text representing ordinary tab stops every eight
  654. columns:
  655.  
  656.              :       :       :       :       :       :
  657.      0         1         2         3         4
  658.      0123456789012345678901234567890123456789012345678
  659.      To install changes, type C-c C-c
  660.  
  661.    The first line contains a colon at each tab stop.  The remaining
  662. lines help you see where the colons are and tell you what to do.
  663.  
  664.    Note that the tab stops that control `tab-to-tab-stop' have nothing
  665. to do with displaying tab characters in the buffer.  *Note Display
  666. Vars::, for more information on that.
  667.  
  668. 
  669. File: xemacs.info,  Node: Just Spaces,  Prev: Tab Stops,  Up: Indentation
  670.  
  671. Tabs vs. Spaces
  672. ===============
  673.  
  674.    Emacs normally uses both tabs and spaces to indent lines.  If you
  675. prefer, all indentation can be made from spaces only.  To request this,
  676. set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
  677. altering the variable affects only the current buffer, but there is a
  678. default value which you can change as well.  *Note Locals::.
  679.  
  680.    There are also commands to convert tabs to spaces or vice versa,
  681. always preserving the columns of all non-blank text.  `M-x tabify'
  682. scans the region for sequences of spaces, and converts sequences of at
  683. least three spaces to tabs if that is possible without changing
  684. indentation.  `M-x untabify' changes all tabs in the region to
  685. corresponding numbers of spaces.
  686.  
  687. 
  688. File: xemacs.info,  Node: Text,  Next: Programs,  Prev: Indentation,  Up: Top
  689.  
  690. Commands for Human Languages
  691. ****************************
  692.  
  693.    The term "text" has two widespread meanings in our area of the
  694. computer field.  One is data that is a sequence of characters.  In this
  695. sense of the word any file that you edit with Emacs is text.  The other
  696. meaning is more restrictive: a sequence of characters in a human
  697. language for humans to read (possibly after processing by a text
  698. formatter), as opposed to a program or commands for a program.
  699.  
  700.    Human languages have syntactic and stylistic conventions that editor
  701. commands should support or use to advantage: conventions involving
  702. words, sentences, paragraphs, and capital letters.  This chapter
  703. describes Emacs commands for all these things.  There are also commands
  704. for "filling", or rearranging paragraphs into lines of approximately
  705. equal length.  The commands for moving over and killing words,
  706. sentences, and paragraphs, while intended primarily for editing text,
  707. are also often useful for editing programs.
  708.  
  709.    Emacs has several major modes for editing human language text.  If a
  710. file contains plain text, use Text mode, which customizes Emacs in
  711. small ways for the syntactic conventions of text.  For text which
  712. contains embedded commands for text formatters, Emacs has other major
  713. modes, each for a particular text formatter.  Thus, for input to TeX,
  714. you can use TeX mode; for input to nroff, Nroff mode.
  715.  
  716. * Menu:
  717.  
  718. * Text Mode::   The major modes for editing text files.
  719. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  720. * TeX Mode::    The major modes for editing input to the formatter TeX.
  721. * Outline Mode::The major mode for editing outlines.
  722. * Words::       Moving over and killing words.
  723. * Sentences::   Moving over and killing sentences.
  724. * Paragraphs::    Moving over paragraphs.
  725. * Pages::    Moving over pages.
  726. * Filling::     Filling or justifying text
  727. * Case::        Changing the case of text
  728.  
  729. 
  730. File: xemacs.info,  Node: Text Mode,  Next: Words,  Prev: Text,  Up: Text
  731.  
  732. Text Mode
  733. =========
  734.  
  735.    You should use Text mode--rather than Fundamental or Lisp mode--to
  736. edit files of text in a human language.  Invoke `M-x text-mode' to
  737. enter Text mode.  In Text mode, TAB runs the function
  738. `tab-to-tab-stop', which allows you to use arbitrary tab stops set with
  739. `M-x edit-tab-stops' (*note Tab Stops::.).  Features concerned with
  740. comments in programs are turned off unless they are explicitly invoked.
  741. The syntax table is changed so that periods are not considered part of a
  742. word, while apostrophes, backspaces and underlines are.
  743.  
  744.    A similar variant mode is Indented Text mode, intended for editing
  745. text in which most lines are indented.  This mode defines TAB to run
  746. `indent-relative' (*note Indentation::.), and makes Auto Fill indent
  747. the lines it creates.  As a result, a line made by Auto Filling, or by
  748. LFD, is normally indented just like the previous line.  Use `M-x
  749. indented-text-mode' to select this mode.
  750.  
  751.    Entering Text mode or Indented Text mode calls the value of the
  752. variable `text-mode-hook' with no arguments, if that value exists and
  753. is not `nil'.  This value is also called when modes related to Text
  754. mode are entered; this includes Nroff mode, TeX mode, Outline mode, and
  755. Mail mode.  Your hook can look at the value of `major-mode' to see
  756. which of these modes is actually being entered.
  757.  
  758.    Two modes similar to Text mode are of use for editing text that is to
  759. be passed through a text formatter before achieving its final readable
  760. form.
  761.  
  762. * Menu:
  763.  
  764. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  765. * TeX Mode::    The major modes for editing input to the formatter TeX.
  766.  
  767.  
  768.   Another similar mode is used for editing outlines.  It allows you
  769. to view the text at various levels of detail.  You can view either
  770. the outline headings alone or both headings and text; you can also
  771. hide some of the headings at lower levels from view to make the high
  772. level structure more visible.
  773.  
  774.  
  775. * Outline Mode::The major mode for editing outlines.
  776.  
  777. 
  778. File: xemacs.info,  Node: Nroff Mode,  Next: TeX Mode,  Prev: Text Mode,  Up: Text Mode
  779.  
  780. Nroff Mode
  781. ----------
  782.  
  783.    Nroff mode is a mode like Text mode but modified to handle nroff
  784. commands present in the text.  Invoke `M-x nroff-mode' to enter this
  785. mode.  Nroff mode differs from Text mode in only a few ways.  All nroff
  786. command lines are considered paragraph separators, so that filling never
  787. garbles the nroff commands.  Pages are separated by `.bp' commands.
  788. Comments start with backslash-doublequote.  There are also three special
  789. commands that are not available in Text mode:
  790.  
  791. `M-n'
  792.      Move to the beginning of the next line that isn't an nroff command
  793.      (`forward-text-line').  An argument is a repeat count.
  794.  
  795. `M-p'
  796.      Like `M-n' but move up (`backward-text-line').
  797.  
  798. `M-?'
  799.      Prints in the echo area the number of text lines (lines that are
  800.      not nroff commands) in the region (`count-text-lines').
  801.  
  802.    The other feature of Nroff mode is Electric Nroff newline mode.
  803. This is a minor mode that you can turn on or off with `M-x
  804. electric-nroff-mode' (*note Minor Modes::.).  When the mode is on and
  805. you use RET to end a line containing an nroff command that opens a kind
  806. of grouping, Emacs automatically inserts the matching nroff command to
  807. close that grouping on the following line.  For example, if you are at
  808. the beginning of a line and type `.(b RET', the matching command `.)b'
  809. will be inserted on a new line following point.
  810.  
  811.    Entering Nroff mode calls the value of the variable `text-mode-hook'
  812. with no arguments, if that value exists and is not `nil'; then it does
  813. the same with the variable `nroff-mode-hook'.
  814.  
  815. 
  816. File: xemacs.info,  Node: TeX Mode,  Next: Outline Mode,  Prev: Nroff Mode,  Up: Text Mode
  817.  
  818. TeX Mode
  819. --------
  820.  
  821.    TeX is a powerful text formatter written by Donald Knuth; like GNU
  822. Emacs, it is free.  LaTeX is a simplified input format for TeX,
  823. implemented by TeX macros.  It is part of TeX.
  824.  
  825.    Emacs has a special TeX mode for editing TeX input files.  It
  826. provides facilities for checking the balance of delimiters and for
  827. invoking TeX on all or part of the file.
  828.  
  829.    TeX mode has two variants, Plain TeX mode and LaTeX mode, which are
  830. two distinct major modes that differ only slightly.  These modes are
  831. designed for editing the two different input formats.  The command `M-x
  832. tex-mode' looks at the contents of a buffer to determine whether it
  833. appears to be LaTeX input or not; it then selects the appropriate mode.
  834. If it can't tell which is right (e.g., the buffer is empty), the
  835. variable `tex-default-mode' controls which mode is used.
  836.  
  837.    The commands `M-x plain-tex-mode' and `M-x latex-mode' explicitly
  838. select one of the variants of TeX mode.  Use these commands when `M-x
  839. tex-mode' does not guess right.
  840.  
  841. * Menu:
  842.  
  843. * Editing: TeX Editing.   Special commands for editing in TeX mode.
  844. * Printing: TeX Print.    Commands for printing part of a file with TeX.
  845.  
  846.    TeX for Unix systems can be obtained from the University of
  847. Washington for a distribution fee.
  848.  
  849.    To order a full distribution, send $140.00 for a 1/2 inch 9-track
  850. tape, $165.00 for two 4-track 1/4 inch cartridge tapes (foreign sites
  851. $150.00, for 1/2 inch, $175.00 for 1/4 inch, to cover the extra
  852. postage) payable to the University of Washington to:
  853.  
  854.      The Director
  855.      Northwest Computer Support Group,  DW-10
  856.      University of Washington
  857.      Seattle, Washington 98195
  858.  
  859. Purchase orders are acceptable, but there is an extra charge of $10.00
  860. to pay for processing charges. (The total cost comes to $150 for
  861. domestic sites, $175 for foreign sites).
  862.  
  863.    The normal distribution is a tar tape, blocked 20, 1600 bpi, on an
  864. industry standard 2400 foot half-inch reel.  The physical format for
  865. the 1/4 inch streamer cartridges uses QIC-11, 8000 bpi, 4-track
  866. serpentine recording for the SUN.  Also, SystemV tapes can be written
  867. in cpio format, blocked 5120 bytes, ASCII headers.
  868.  
  869. 
  870. File: xemacs.info,  Node: TeX Editing,  Next: TeX Print,  Prev: TeX Mode,  Up: TeX Mode
  871.  
  872. TeX Editing Commands
  873. ....................
  874.  
  875.    Here are the special commands provided in TeX mode for editing the
  876. text of the file.
  877.  
  878. `"'
  879.      Insert, according to context, either ```' or `"' or `'''
  880.      (`TeX-insert-quote').
  881.  
  882. `LFD'
  883.      Insert a paragraph break (two newlines) and check the previous
  884.      paragraph for unbalanced braces or dollar signs (`tex-terminate-
  885.      paragraph').
  886.  
  887. `M-x validate-tex-buffer'
  888.      Check each paragraph in the buffer for unbalanced braces or dollar
  889.      signs.
  890.  
  891. `C-c {'
  892.      Insert `{}' and position point between them (`tex-insert-braces').
  893.  
  894. `C-c }'
  895.      Move forward past the next unmatched close brace (`up-list').
  896.  
  897. `C-c C-e'
  898.      Close a block for LaTeX (`tex-close-latex-block').
  899.  
  900.    In TeX, the character `"' is not normally used; you use ```' to
  901. start a quotation and `''' to end one.  TeX mode defines the key `"' to
  902. insert ```' after whitespace or an open brace, `"' after a backslash,
  903. or `''' otherwise.  This is done by the command `tex-insert-quote'.  If
  904. you need the character `"' itself in unusual contexts, use `C-q' to
  905. insert it.  Also, `"' with a numeric argument always inserts that
  906. number of `"' characters.
  907.  
  908.    In TeX mode, `$' has a special syntax code which attempts to
  909. understand the way TeX math mode delimiters match.  When you insert a
  910. `$' that is meant to exit math mode, the position of the matching `$'
  911. that entered math mode is displayed for a second.  This is the same
  912. feature that displays the open brace that matches a close brace that is
  913. inserted.  However, there is no way to tell whether a `$' enters math
  914. mode or leaves it; so when you insert a `$' that enters math mode, the
  915. previous `$' position is shown as if it were a match, even though they
  916. are actually unrelated.
  917.  
  918.    If you prefer to keep braces balanced at all times, you can use `C-c
  919. {' (`tex-insert-braces') to insert a pair of braces.  It leaves point
  920. between the two braces so you can insert the text that belongs inside.
  921. Afterward, use the command `C-c }' (`up-list') to move forward past the
  922. close brace.
  923.  
  924.    There are two commands for checking the matching of braces.  LFD
  925. (`tex-terminate-paragraph') checks the paragraph before point, and
  926. inserts two newlines to start a new paragraph.  It prints a message in
  927. the echo area if any mismatch is found.  `M-x validate-tex-buffer'
  928. checks the entire buffer, paragraph by paragraph.  When it finds a
  929. paragraph that contains a mismatch, it displays point at the beginning
  930. of the paragraph for a few seconds and pushes a mark at that spot.
  931. Scanning continues until the whole buffer has been checked or until you
  932. type another key.  The positions of the last several paragraphs with
  933. mismatches can be found in the mark ring (*note Mark Ring::.).
  934.  
  935.    Note that square brackets and parentheses, not just braces, are
  936. matched in TeX mode.  This is wrong if you want to  check TeX syntax.
  937. However, parentheses and square brackets are likely to be used in text
  938. as matching delimiters and it is useful for the various motion commands
  939. and automatic match display to work with them.
  940.  
  941.    In LaTeX input, `\begin' and `\end' commands must balance.  After
  942. you insert a `\begin', use `C-c C-f' (`tex-close-latex-block') to
  943. insert automatically a matching `\end' (on a new line following the
  944. `\begin').  A blank line is inserted between the two, and point is left
  945. there.
  946.  
  947. 
  948. File: xemacs.info,  Node: TeX Print,  Prev: TeX Editing,  Up: TeX Mode
  949.  
  950. TeX Printing Commands
  951. .....................
  952.  
  953.    You can invoke TeX as an inferior of Emacs on either the entire
  954. contents of the buffer or just a region at a time.  Running TeX in this
  955. way on just one chapter is a good way to see what your changes look
  956. like without taking the time to format the entire file.
  957.  
  958. `C-c C-r'
  959.      Invoke TeX on the current region, plus the buffer's header
  960.      (`tex-region').
  961.  
  962. `C-c C-b'
  963.      Invoke TeX on the entire current buffer (`tex-buffer').
  964.  
  965. `C-c C-l'
  966.      Recenter the window showing output from the inferior TeX so that
  967.      the last line can be seen (`tex-recenter-output-buffer').
  968.  
  969. `C-c C-k'
  970.      Kill the inferior TeX (`tex-kill-job').
  971.  
  972. `C-c C-p'
  973.      Print the output from the last `C-c C-r' or `C-c C-b' command
  974.      (`tex-print').
  975.  
  976. `C-c C-q'
  977.      Show the printer queue (`tex-show-print-queue').
  978.  
  979.    You can pass the current buffer through an inferior TeX using `C-c
  980. C-b' (`tex-buffer').  The formatted output appears in a file in `/tmp';
  981. to print it, type `C-c C-p' (`tex-print').  Afterward use `C-c C-q'
  982. (`tex-show-print-queue') to view the progress of your output towards
  983. being printed.
  984.  
  985.    The console output from TeX, including any error messages, appears
  986. in a buffer called `*TeX-shell*'.  If TeX gets an error, you can switch
  987. to this buffer and feed it input (this works as in Shell mode; *note
  988. Interactive Shell::.).  Without switching to this buffer, you can scroll
  989. it so that its last line is visible by typing `C-c C-l'.
  990.  
  991.    Type `C-c C-k' (`tex-kill-job') to kill the TeX process if you see
  992. that its output is no longer useful.  Using `C-c C-b' or `C-c C-r' also
  993. kills any TeX process still running.
  994.  
  995.    You can pass an arbitrary region through an inferior TeX by typing
  996. `C-c C-r' (`tex-region').  This is tricky, however, because most files
  997. of TeX input contain commands at the beginning to set parameters and
  998. define macros.  Without them, no later part of the file will format
  999. correctly.  To solve this problem, `C-c C-r' allows you to designate a
  1000. part of the file as containing essential commands; it is included
  1001. before the specified region as part of the input to TeX.  The
  1002. designated part of the file is called the "header".
  1003.  
  1004.    To indicate the bounds of the header in Plain TeX mode, insert two
  1005. special strings in the file: `%**start of header' before the header,
  1006. and `%**end of header' after it.  Each string must appear entirely on
  1007. one line, but there may be other text on the line before or after.  The
  1008. lines containing the two strings are included in the header.  If
  1009. `%**start of header' does not appear within the first 100 lines of the
  1010. buffer, `C-c C-r' assumes there is no header.
  1011.  
  1012.    In LaTeX mode, the header begins with `\documentstyle' and ends with
  1013. `\begin{document}'.  These are commands that LaTeX requires you to use,
  1014. so you don't need to do anything special to identify the header.
  1015.  
  1016.    When you enter either kind of TeX mode, Emacs calls with no
  1017. arguments the value of the variable `text-mode-hook', if that value
  1018. exists and is not `nil'.  Emacs then calls the variable `TeX-mode-hook'
  1019. and either `plain-TeX-mode-hook' or `LaTeX-mode-hook' under the same
  1020. conditions.
  1021.  
  1022. 
  1023. File: xemacs.info,  Node: Outline Mode,  Prev: TeX Mode,  Up: Text Mode
  1024.  
  1025. Outline Mode
  1026. ------------
  1027.  
  1028.    Outline mode is a major mode similar to Text mode but intended for
  1029. editing outlines.  It allows you to make parts of the text temporarily
  1030. invisible so that you can see just the overall structure of the
  1031. outline.  Type `M-x outline-mode' to turn on Outline mode in the
  1032. current buffer.
  1033.  
  1034.    When you enter Outline mode, Emacs calls with no arguments the value
  1035. of the variable `text-mode-hook', if that value exists and is not
  1036. `nil'; then it does the same with the variable `outline-mode-hook'.
  1037.  
  1038.    When a line is invisible in outline mode, it does not appear on the
  1039. screen.  The screen appears exactly as if the invisible line were
  1040. deleted, except that an ellipsis (three periods in a row) appears at
  1041. the end of the previous visible line (only one ellipsis no matter how
  1042. many invisible lines follow).
  1043.  
  1044.    All editing commands treat the text of the invisible line as part of
  1045. the previous visible line.  For example, `C-n' moves onto the next
  1046. visible line.  Killing an entire visible line, including its
  1047. terminating newline, really kills all the following invisible lines as
  1048. well; yanking everything back yanks the invisible lines and they remain
  1049. invisible.
  1050.  
  1051. * Menu:
  1052.  
  1053. * Format: Outline Format.      What the text of an outline looks like.
  1054. * Motion: Outline Motion.      Special commands for moving through outlines.
  1055. * Visibility: Outline Visibility. Commands to control what is visible.
  1056.  
  1057. 
  1058. File: xemacs.info,  Node: Outline Format,  Next: Outline Motion,  Prev: Outline Mode,  Up: Outline Mode
  1059.  
  1060. Format of Outlines
  1061. ..................
  1062.  
  1063.    Outline mode assumes that the lines in the buffer are of two types:
  1064. "heading lines" and "body lines".  A heading line represents a topic in
  1065. the outline.  Heading lines start with one or more stars; the number of
  1066. stars determines the depth of the heading in the outline structure.
  1067. Thus, a heading line with one star is a major topic; all the heading
  1068. lines with two stars between it and the next one-star heading are its
  1069. subtopics; and so on.  Any line that is not a heading line is a body
  1070. line.  Body lines belong to the preceding heading line.  Here is an
  1071. example:
  1072.  
  1073.      * Food
  1074.      
  1075.      This is the body,
  1076.      which says something about the topic of food.
  1077.      
  1078.      ** Delicious Food
  1079.      
  1080.      This is the body of the second-level header.
  1081.      
  1082.      ** Distasteful Food
  1083.      
  1084.      This could have
  1085.      a body too, with
  1086.      several lines.
  1087.      
  1088.      *** Dormitory Food
  1089.      
  1090.      * Shelter
  1091.      
  1092.      A second first-level topic with its header line.
  1093.  
  1094.    A heading line together with all following body lines is called
  1095. collectively an "entry".  A heading line together with all following
  1096. deeper heading lines and their body lines is called a "subtree".
  1097.  
  1098.    You can customize the criterion for distinguishing heading lines by
  1099. setting the variable `outline-regexp'.  Any line whose beginning has a
  1100. match for this regexp is considered a heading line.  Matches that start
  1101. within a line (not at the beginning) do not count.  The length of the
  1102. matching text determines the level of the heading; longer matches make
  1103. a more deeply nested level.  Thus, for example, if a text formatter has
  1104. commands `@chapter', `@section' and `@subsection' to divide the
  1105. document into chapters and sections, you can make those lines count as
  1106. heading lines by setting `outline-regexp' to
  1107. `"@chap\\|@\\(sub\\)*section"'.  Note the trick: the two words
  1108. `chapter' and `section' are the same length, but by defining the regexp
  1109. to match only `chap' we ensure that the length of the text matched on a
  1110. chapter heading is shorter, so that Outline mode will know that
  1111. sections are contained in chapters.  This works as long as no other
  1112. command starts with `@chap'.
  1113.  
  1114.    Outline mode makes a line invisible by changing the newline before it
  1115. into an ASCII Control-M (code 015).  Most editing commands that work on
  1116. lines treat an invisible line as part of the previous line because,
  1117. strictly speaking, it is part of that line, since there is no longer a
  1118. newline in between.  When you save the file in Outline mode, Control-M
  1119. characters are saved as newlines, so the invisible lines become ordinary
  1120. lines in the file.  Saving does not change the visibility status of a
  1121. line inside Emacs.
  1122.  
  1123. 
  1124. File: xemacs.info,  Node: Outline Motion,  Next: Outline Visibility,  Prev: Outline Format,  Up: Outline Mode
  1125.  
  1126. Outline Motion Commands
  1127. .......................
  1128.  
  1129.    Some special commands in Outline mode move backward and forward to
  1130. heading lines.
  1131.  
  1132. `C-c C-n'
  1133.      Move point to the next visible heading line
  1134.      (`outline-next-visible-heading').
  1135.  
  1136. `C-c C-p'
  1137.      Move point to the previous visible heading line
  1138.      (`outline-previous-visible-heading').
  1139.  
  1140. `C-c C-f'
  1141.      Move point to the next visible heading line at the same level as
  1142.      the one point is on (`outline-forward-same-level').
  1143.  
  1144. `C-c C-b'
  1145.      Move point to the previous visible heading line at the same level
  1146.      (`outline-backward-same-level').
  1147.  
  1148. `C-c C-u'
  1149.      Move point up to a lower-level (more inclusive) visible heading
  1150.      line (`outline-up-heading').
  1151.  
  1152.    `C-c C-n' (`next-visible-heading') moves down to the next heading
  1153. line.  `C-c C-p' (`previous-visible-heading') moves similarly backward.
  1154. Both accept numeric arguments as repeat counts.  The names emphasize
  1155. that invisible headings are skipped, but this is not really a special
  1156. feature.  All editing commands that look for lines ignore the invisible
  1157. lines automatically.
  1158.  
  1159.    More advanced motion commands understand the levels of headings.
  1160. The commands `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
  1161. (`outline-backward-same-level') move from one heading line to another
  1162. visible heading at the same depth in the outline.  `C-c C-u'
  1163. (`outline-up-heading') moves backward to another heading that is less
  1164. deeply nested.
  1165.  
  1166.